package com.pz.cloud.framework.business.researchProj.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.pz.cloud.framework.business.researchProj.entity.*;
import com.pz.cloud.framework.business.workflow.model.ProcessRecordModel;
import com.pz.cloud.framework.business.workflow.model.WorkflowModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

@Data
public class ResearchProjectVo {

    @ApiModelProperty(value = "主要信息")
    @NotNull
    private ResearchProject researchProject;

    @ApiModelProperty(value = "负责人信息")
    private ResearchProjectDirector director;

    @ApiModelProperty(value = "指导老师信息")
    private ResearchProjectInstructor instructor;

    @ApiModelProperty(value = "研究内容")
    private List<ResearchProjectDetail> details;

    @ApiModelProperty(value = "成员信息")
    private List<ResearchProjectMem> members;

    @ApiModelProperty(value = "资金明细")
    private List<ResearchProjectFund> funds;

    @TableField(exist = false)
    protected WorkflowModel workflowModel;

    @TableField(exist = false)
    private List<ProcessRecordModel> approveRecords;


    public WorkflowModel getWorkflowModel() {
        if(workflowModel==null){
            workflowModel = new WorkflowModel();
        }
        return workflowModel;
    }

}
